package edu.sctu.zhoumengxue.day201506.day20150626;

import edu.sctu.zhoumengxue.day201506.day20150626.practicePost.JsonAppbean;
import edu.sctu.zhoumengxue.day201506.day20150626.practicePost.JsonUtil;
import edu.sctu.zhoumengxue.day201506.day20150626.practicePost.postWeb;
import edu.sctu.zhoumengxue.day201506.day20150626.practicePost.URLAddress;

/**
 * Created by user12 on 2015/6/26.
 */
public class Main {
    public static void main(String[] args) {



        URLAddress address = new URLAddress();
        String path = address.param;

        postWeb web = new postWeb();
        String string = web.getPost(path);
        System.out.println(string);

        JsonUtil util = new JsonUtil();
        JsonAppbean appbean = util.getJson(string);

        System.out.println(appbean.error);
        for (int i = 0; i <appbean.list.size() ; i++) {
            System.out.println(appbean.list.get(i).category_id);
            System.out.println(appbean.list.get(i).brand_id);
            System.out.println(appbean.list.get(i).goods_introduce);
            System.out.println(appbean.list.get(i).goods_name);
            System.out.println(appbean.list.get(i).goods_price);
            System.out.println(appbean.list.get(i).rec_id);
        }


    }
}
